<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="renderer" content="webkit" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <title>千锋教育大前端React教学</title>
  <!-- 引入react -->
  <script src="https://unpkg.com/react@18/umd/react.production.min.js" crossorigin></script>
  <!-- 引入react-dom -->
  <script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" crossorigin></script>
</head>

<body style="margin:100px;font-size:22px;">
  <!-- 定义一个容器 -->
  <div id="app"></div>
  <script>
    // react的创建标签的函数，相当于vue中的h函数
    const h = React.createElement;
    // 创建应用
    const app = h('div', null, 'Hello World!');
    // 挂载应用
    ReactDOM.createRoot(document.getElementById('app')).render(app);
  </script>
</body>

</html>